package com.edgar;

import com.jfinal.config.*;
import com.jfinal.server.undertow.UndertowServer;
import com.jfinal.template.Engine;

public class DemoConfig extends JFinalConfig {
    @Override
    public void configConstant(Constants constants) {

    }

    @Override
    public void configRoute(Routes routes) {
        routes.add("/", SystemController.class);
    }

    @Override
    public void configEngine(Engine engine) {
        engine.setToClassPathSourceFactory();
        engine.setBaseTemplatePath("/views");
    }

    @Override
    public void configPlugin(Plugins plugins) {

    }

    @Override
    public void configInterceptor(Interceptors interceptors) {

    }

    @Override
    public void configHandler(Handlers handlers) {

    }

    public static void main(String[] args) {
        UndertowServer.create(DemoConfig.class, "application.properties").start();
    }
}
